January 04, 2025
v3 Get Whatsapp Template
Description:
Returns a special whatsapp template in the account.
URI:
https://api.multitel.net/v3/wa_template/${template_id}
Methods:
GET
Sample Output:
{ "status": { "code": 200, "msg": "" }, "response": [ { "id": "2a94c323afaae566b3c29fd1c772edae", "name": "location_template", "language": "en", "type": "location", "category": "MARKETING", "components": [ { "type": "HEADER", "format": "LOCATION" }, { "type": "BODY", "text": "Hello {{1}}, \r\nHere is the location of {{2}} as requested: \r\nTap the link below to view it on the map: \r\n\r\nLooking forward to your visit!", "example": { "body_text": [ [ "ex1", "ex2" ] ] } } ], "status": "approved", "date": "2024-12-10 15:59:44" }, ] }
Sample Code:
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://api.multitel.net/v3/wa_template/${template_id}', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json', 'Accept: application/json', 'Authorization: Basic YWRtaW46Vnc0OXBYNk', ), )); $response = curl_exec($curl); curl_close($curl); echo $response;